package com.situ.day10;

public class VariableLengthArgument {
    // method1("a", "b");
    /*public  void method1(String... arg1, String args) {
        //......
    }*/

    public  void method2(String arg1, String... args) {
        //......
    }

    public static void printVariable(String... args) {
        for (String arg : args) {
            System.out.println(arg);
        }
    }

    public static void printVariable(String arg1, String arg2) {
        System.out.println(arg1 + arg2);
    }

    public static void main(String[] args) {
        printVariable();
        printVariable("a");
        printVariable("a", "b");
        printVariable("a", "b", "c");
    }
}
